package com.sziit.se.highconcurrency.order.application.feignclient;

import com.sziit.se.highconcurrency.common.result.DataResult;
import com.sziit.se.highconcurrency.common.result.Result;
import com.sziit.se.highconcurrency.order.application.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "product", url = "http://localhost:8888")
public interface ProductFeign {
    @GetMapping("/product/product/query-by-id")
    DataResult getProductById(@RequestParam(value = "product_id") String productId);

    @PutMapping("/product/product/update-by-id")
    DataResult updateProductById(@RequestBody Product product);
}
